package com.sun.xml.wss.impl;

import javax.xml.namespace.QName;
import javax.xml.soap.Detail;

public class WssSoapFaultException extends java.lang.RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private QName faultcode;
	private String faultstring;
	private String faultactor;
	private Detail detail;

	public WssSoapFaultException(QName faultcode, String faultstring,
			String faultactor, javax.xml.soap.Detail faultdetail) {
		super(faultstring);
		this.faultcode = faultcode;
		this.faultstring = faultstring;
		this.faultactor = faultactor;
		this.detail = faultdetail;
	}

	public QName getFaultCode() {
		return this.faultcode;
	}

	/**
	 * Gets the <code>faultstring</code> element. The <code>faultstring</code>
	 * provides a human-readable description of the SOAP fault and is not
	 * intended for algorithmic processing.
	 * 
	 * @return faultstring element of the SOAP fault
	 */
	public String getFaultString() {
		return this.faultstring;
	}

	/**
	 * Gets the <code>faultactor</code> element. The <code>faultactor</code>
	 * element provides information about which SOAP node on the SOAP message
	 * path caused the fault to happen. It indicates the source of the fault.
	 * 
	 * @return <code>faultactor</code> element of the SOAP fault
	 */
	public String getFaultActor() {
		return this.faultactor;
	}

	/**
	 * Gets the detail element. The detail element is intended for carrying
	 * application specific error information related to the SOAP Body.
	 * 
	 * @return <code>detail</code> element of the SOAP fault
	 * @see javax.xml.soap.Detail
	 */
	public Detail getDetail() {
		return this.detail;
	}
}
